]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowMenu: Only add workspace actions when enabled by session mode
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 23 May 2014 16:38:23 +0000 (18:38 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 27 May 2014 17:49:06 +0000 (19:49 +0200)
When workspaces are disabled by the session mode, all workspace
related actions don't make sense. Worse, the "Move to Workspace ..."
actions allow sending windows into a nirvana with no means to
get them back.

https://bugzilla.gnome.org/show_bug.cgi?id=730653

js/ui/windowMenu.js

index 395ccfe7310785b77dca2b1698d586404adbf302..cca5504a40c9c74246e2591a2b4519048b9d697c 100644 (file)
@@ -81,7 +81,9 @@ const WindowMenu = new Lang.Class({
             type == Meta.WindowType.SPLASHSCREEN)
             item.setSensitive(false);
 
-        if (!Meta.prefs_get_workspaces_only_on_primary() || window.is_on_primary_monitor()) {
+        if (Main.sessionMode.hasWorkspaces &&
+            (!Meta.prefs_get_workspaces_only_on_primary() ||
+             window.is_on_primary_monitor())) {
             let isSticky = window.is_on_all_workspaces();
 
             item = this.addAction(_("Always on Visible Workspace"), Lang.bind(this, function() {